package com.xyl.dubbo;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author elinshaw
 */
@RestController
public class HelloController {

    @DubboReference(url = "dubbo://127.0.0.1:20880/com.xyl.dubbo.IHelloService")
    private IHelloService helloService;

    @GetMapping("/say")
    public String sayHello() {
        return helloService.sayHello("Mic");
    }

}
